#if !defined(AFX_MODELFILEDLG_H__50EB82A1_BD0A_11D2_AE44_C04D05C10000__INCLUDED_)
#define AFX_MODELFILEDLG_H__50EB82A1_BD0A_11D2_AE44_C04D05C10000__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ModelFileDlg.h : header file
//

#include "Util\MinButton.h"
#include "Util\MinLabel.h"

#define  ALL_MODEL_LABEL  24

class CDMControlCenter;
class CModelData;
class CSystemData;

// Control Layer
class IWaferTapeMount;
// Process Layer
class IAutoManager;
class ITrsWaferTapeMount;

/////////////////////////////////////////////////////////////////////////////
// CModelFileDlg dialog

class CModelFileDlg : public CDialog
{
private:
	
	IWaferTapeMount* m_lnkWaferTapeMount;
	ITrsWaferTapeMount* m_lnkTrsWaferTapeMount;

	CDMControlCenter* m_lnkDMControlCenter;
	CModelData* m_lnkModelData;
	CSystemData* m_lnkSystemData;

	int DirCountInDir(char* pn);

// Construction
public:
	char m_szTmp[100];
	int m_ModelCount;
	int m_CurrentSel;
	CString m_strSelect;
	void ModelListBoxInit();
	void LabelInitial();
	void ButtonInitial();
	void PointSelect(int sel);
	void Display(BOOL change);
	int m_nSelect;

	CModelFileDlg(IAutoManager* pAM,CDMControlCenter* pDMCC, int nSelect, CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CModelFileDlg)
	enum { IDD = IDD_MODEL_DIALOG };
	CMinButton  m_bCutCounter;
	CMinButton	m_bTapeStripOffset2;
	CMinButton	m_bTapeStripOffset1;
	CMinButton	m_bTableOffset;
	CMinButton	m_bPressSetTest;
	CMinButton	m_bRobotTurnSet;
	CMinButton	m_bWAWatingSet;
	CMinButton	m_bWAStripSet;
	CMinButton	m_bWAPressSet;
	CMinButton	m_bWAFeddingSet;
	CMinButton	m_bRWWaitiongSet;
	CMinButton	m_bRWStripSet;
	CMinButton	m_bRWPressSet;
	CMinButton	m_bRWFeddingSet;
	CMinButton	m_bWAWaitingorque;
	CMinButton	m_bWAStripTorque;
	CMinButton	m_bWAPressTorque;
	CMinButton	m_bWAFeedingTorque;
	CMinButton	m_bRWWaitingTorque;
	CMinButton	m_bRWStripTorque;
	CMinButton	m_bRWPressTorque;
	CMinButton	m_bRWFeedingTorque;
	CMinButton	m_bPressSet;
	CMinButton	m_bRFIDWriting;
	CMinButton	m_bRFIDReading;
	CMinButton	m_bDoorType;
	CMinButton	m_bTapingPress;
	CMinButton	m_bTapeTension;
	CMinButton	m_bRetryCount;
	CMinButton	m_bAlignOffset;
	CMinButton	m_bTapeFeeding;
	CMinButton	m_bPressSpeed;
	CMinButton	m_bModelSave;
	CMinButton	m_bModelNew;
	CMinButton	m_bModelFilePgDown;
	CMinButton	m_bModelFilePgUp;
	CMinButton	m_bModelFileDown;
	CMinButton	m_bModelFileUp;	
	CMinButton	m_bModelDelete;
	CMinButton	m_bModelLoad;
	CMinButton  m_bExit;
	CMinLabel	m_sSelectModel;
	CMinLabel	m_sSelectModelTitle;
	CMinLabel	m_sModelCount;
	CMinLabel	m_sCurrentModelTitle;
	CMinLabel	m_sCurrentModel;
	CListBox	m_lModelList;
	CMinButton  m_bRewindOffsetMove;
	CMinButton  m_bRWMotorPressOffset;
	CMinButton  m_bPressMotorPressOffset;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CModelFileDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	char m_cBufGet[50];
	char m_cbuf[50];
	
	double m_tmpDouble[ALL_MODEL_LABEL];
	CMinLabel	m_sData[ALL_MODEL_LABEL];
	CMinButton	m_bButton[ALL_MODEL_LABEL];
	// Generated message map functions
	//{{AFX_MSG(CModelFileDlg)
	afx_msg void OnModelfileup();
	afx_msg void OnModelfiledown();
	afx_msg void OnModelfilepgup();
	afx_msg void OnModelfilepgdn();
	afx_msg void OnModeldelete();
	afx_msg void OnModelload();
	afx_msg void OnExit();
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeModellist();
	afx_msg void OnModelNew();
	afx_msg void OnModelSave();
	afx_msg void OnPressSpeed();
	afx_msg void OnTapeFeeding();
	afx_msg void OnAlignOffset();
	afx_msg void OnLoadingRetry();
	afx_msg void OnDoorType();
	afx_msg void OnRfidReadingSet();
	afx_msg void OnRfidWritingSet();
	afx_msg void OnPressSet();
	afx_msg void OnWaWaitingTorque();
	afx_msg void OnWaFeedingTorque();
	afx_msg void OnWaPressTorque();
	afx_msg void OnWaStripTorque();
	afx_msg void OnRwWaitingTorque();
	afx_msg void OnRwFeedingTorque();
	afx_msg void OnRwPressTorque();
	afx_msg void OnRwStripTorque();
	afx_msg void OnWaWaitingSet();
	afx_msg void OnWaFeedingSet();
	afx_msg void OnWaPressSet();
	afx_msg void OnWaStripSet();
	afx_msg void OnRwWaitingSet();
	afx_msg void OnRwFeedingSet();
	afx_msg void OnRwPressSet();
	afx_msg void OnRwStripSet();
	afx_msg void OnPressSetTest();
	afx_msg void OnRobotTurn();
	afx_msg void OnTableOffset();
	afx_msg void OnTapeStripOffset1();
	afx_msg void OnTapeStripOffset2();
	afx_msg void OnCutCounter();
	afx_msg void OnRwOffsetMove();
	afx_msg void OnRwPressOffset();
	afx_msg void OnPressMotorOffset();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MODELFILEDLG_H__50EB82A1_BD0A_11D2_AE44_C04D05C10000__INCLUDED_)
